home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmiSoft / Dev / C / Tinygl.lha / TinyGL / readme_amiga.txt < prev    next >
Text File  |  2003-01-22  |  4KB  |  83 lines

  1.  
  2. AGA Amigas have their OpenGL implementation. TinyGL is a subset of the OpenGL API and allows a software rendering. It's perfect to understand and start OpenGL programming !
  3.  
  4. I was interested in OpenGL but having a 060/AGA Amiga I was unable to start programming OpenGL demos. I had a look at TinyGL when Ruben Monteiro realized an AmigaDE port. Then I found out an already existing Atari version by Olivier Landemarre. It was enough to think about an Amiga port (even for 68k/AGA).
  5.  
  6.  
  7. * Features of the Amiga version
  8.  
  9. - GCC lib and SAS/C lib : just link the good one and run
  10. - !! StormC 3 is not supported for then moment because it seems its preprocessor is not fully able to compile the almost standard code of TinyGL !!
  11. - glA functions to interface and display images
  12. - GLUT main functions to compile examples without any changes (almost :)
  13. - AGA (on a private screen) and CGFX/P96 (on window or fullscreen) supported
  14. - only 1 window/display available
  15. - limitations are described into the original file called LIMITATION
  16. - small exe obtained (the lib is about 100 ko)
  17.  
  18.  
  19. * What's new in this version ?
  20.  
  21. - now works with a display in a Workbench window if depth > 8 bits
  22. - MorphOS supported !
  23. - GLUT : timing and idle function management (GLUT_ELAPSED_TIME)
  24. - tested with blazewcp on my 060/AGA machine : it's 2.5 times faster !
  25. - GLUT : glutFullScreen function works now to display on screen with CGFX/P96
  26. - more examples and a makefile to compile them
  27. - -lauto option is not necessary anymore
  28.  
  29.  
  30. * To do
  31.  
  32. - Join this version with the Ruben Monteiro's project (AmigaDE version) which supports blend and other stuff
  33. - Clean the code and optimize (mainly the math parts)
  34. - Map the GLUT key codes for using in the keyboard() function
  35. - Compile the lib with VBCC
  36.  
  37.  
  38. * What I did. Things about glX
  39.  
  40. Compile TinyGL without the glX part doesn't require anything except running make ;) The problem is you don't benefit glX functions which are interface functions between GL part and display.
  41. So, I made changes into the glx.c file and renamed it in gla.c with all functions beginning with glA (X was for XWindow). It's possible to use the glA functions but I'm sure you will prefer to play with the GLUT functions. They are commonly used and it will be easier to compile existing code.
  42.  
  43.  
  44. * How to install TinyGL ?
  45.  
  46. The archive contains several directories : include, lib, examples, src.
  47.  
  48. With GCC 68k compiler :
  49. - include : copy the GL directiry into gg:m68k-amigaos/include for GCC.
  50. - lib : copy libTinyGL.a into gg:m68k-amigaos/lib
  51. - examples : original example and lesson3 from http://nehe.gamedev.net
  52. - src : use make to compile the GCC library
  53.  
  54. With GCC MorphOS compiler :
  55. The steps are mainly the same, but you have to rename lib/libTinyGL.a.mos
  56. into lib/libTinyGL.a
  57.  
  58. With SAS/C compiler :
  59. - include : copy the GL directory into sc:include
  60. - lib : copy TinyGL.lib into sc:lib
  61. - examples : original example and lesson3 from http://nehe.gamedev.net
  62. - src : use smake to compile the SAS/C library
  63.  
  64.  
  65. * First example
  66.  
  67. A makefile/smakefile is now in the 'examples' directory to build them, anyway :
  68.  
  69. - GCC compiler
  70. gcc -c lesson3.c
  71. gcc -o lesson3 lesson3.o -lTinyGL -lamiga
  72.  
  73. With MorphOS, don't forget to add "-lm" for the math library, otherwise the display willbe trashed :(
  74.  
  75. - SAS/C compiler (with the given SCOPTIONS file)
  76. sc lesson3.c link to lesson3
  77.  
  78. If you have a 68060 CPU, change the 68020 option of the smakefie into 68060, you will increase the speed by ten.
  79.  
  80.  
  81. * Thanks to Fabrice Bellard, Olivier Landemarre and Ruben Monteiro.
  82.  
  83.